#ifndef __PROXY_H__
#define __PROXY_H__

#include <iostream>

class ISubject
{
public:
    ISubject() = default;
    ~ISubject() = default;

    virtual void Operation() = 0;
};

class RealSubject:public ISubject
{
public:
    RealSubject() = default;
    ~RealSubject() = default;

    void Operation();
};

class Proxy:public ISubject
{
public:
    Proxy(ISubject *subject)
    {
        subject_ = subject;
    }
    ~Proxy() = default;

    void Operation();

private:
    ISubject *subject_;
};

#endif

